package com.edu.admin.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.edu.admin.common.BaseService;
import com.edu.admin.entity.SysSchoolPhase;
import com.edu.admin.mapper.SchoolPhaseMapper;
import com.edu.admin.vo.SchoolPhaseVo;

/**
 * 学校学段关联服务
 * 
 * @author Wangjiong
 * 
 */
@Transactional
@Service
public class SchoolPhaseService extends BaseService<SchoolPhaseMapper, SysSchoolPhase> {
	/**
	 * 获取学校学段关联列表
	 * 
	 * @param schoolId
	 * 
	 * @return List<SchoolPhaseVo>
	 */
	public List<SchoolPhaseVo> getSchoolPhaseListBySchoolId(Long schoolId) {
		return this.mapper.getSchoolPhaseListBySchoolId(schoolId);
	}
	
	/**
	 * 学校学段查询
	 * 
	 * @param schoolId
	 * @param phaseName
	 * 
	 * @return List<SchoolPhaseVo>
	 */
	public List<SchoolPhaseVo> getSchoolPhaseBySchoolIdAndPhaseName(Long schoolId,String phaseName) {
		return this.mapper.getSchoolPhaseBySchoolIdAndPhaseName(schoolId,phaseName);
	}
	
	
	/**
	 * 删除学校学段关联
	 * 
	 * @param schoolId
	 * 
	 * @return
	 */
	public void deleteSchoolPhaseBySchoolId(Long schoolId) {
		this.mapper.deleteSchoolPhaseBySchoolId(schoolId);
	}
	
	

}
